<%@ page language="java" pageEncoding="utf-8"%>
<%@page import="com.farm.web.constant.FarmConstant"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/view/conf/farmtag.tld" prefix="PF"%>
<%@ taglib uri="/view/conf/farmdoc.tld" prefix="DOC"%>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation" style="margin: 0px;">
	<div class="navbar-header">
		<button type="button" class="navbar-toggle" data-toggle="collapse"
				data-target="#bs-example-navbar-collapse-1">
			<span class="sr-only">Toggle navigation</span> <span
				class="icon-bar"></span> <span class="icon-bar"></span> <span
				class="icon-bar"></span>
		</button>
		<a class="navbar-brand"
		   style="color: #ffffff; font-weight: bold; padding: 5px;"
		   href="<DOC:defaultIndexPage/>"> <img
				src="<PF:basePath/>/text/img/book_logo.png" height="40" alt="知识库"
				align="middle" />
		</a>
	</div>

	<div class="collapse navbar-collapse"
		 id="bs-example-navbar-collapse-1">
		<ul class="nav navbar-nav">
			<li class="active"><a href="home/Pubindex.html"><span
					class="glyphicon glyphicon-home"></span> 首页</a></li>
			<li class="active"><a href="webtype/view/Pub1.html"><span
					class="glyphicon glyphicon-th"></span>&nbsp;分类</a></li>
			<li class="active"><a href="webgroup/PubHome.html"><span
					class="glyphicon glyphicon-tree-conifer"></span>&nbsp;小组</a></li>
			 <li class="active"><a href="webstat/PubHome.html"><span
					class="glyphicon glyphicon-stats"></span>&nbsp;荣誉</a></li>
			<li class="active"><a href="websearch/PubHome.html"><span
					class="glyphicon glyphicon-search"></span>&nbsp;检索</a></li>
			<li class="active"><a href="home/PubAbout.html"><span
					class="glyphicon glyphicon-phone-alt"></span>&nbsp;联系方式</a></li>
		</ul>
<%--		检索功能--%>
		<form action="websearch/PubDo.do" method="post"
			  id="lucenesearchFormId"
			  class="navbar-form navbar-left hidden-xs hidden-sm" role="search" style="margin-left: 350px">
			<div class="form-group">
				<input type="text" name="word" id="wordId" value="${word}"
					   class="form-control input-sm" placeholder="检索词"> <input
					type="hidden" id="pageNumId" name="pagenum">
			</div>
			<button type="submit" class="btn btn-default btn-sm">检索</button>
			<jsp:include page="../operation/includeCreatOperate.jsp"></jsp:include>

		</form>

		<ul class="nav navbar-nav navbar-right" style="margin-right: 10px;">
			<c:if test="${USEROBJ==null}">
				<li class="active"><a href="login/webPage.html"><span
						class="glyphicon glyphicon glyphicon-user"></span>&nbsp;登录</a></li>
			</c:if>
			<c:if test="${USEROBJ!=null}">
			<!-- 登录後菜單 -->
			<li class="dropdown	"><a class="dropdown-toggle"
										data-toggle="dropdown" role="button" aria-haspopup="true"
										aria-expanded="false"> <span class="glyphicon glyphicon-user"></span>
					${USEROBJ.name}<span class="caret"></span></a>
				<ul class="dropdown-menu">
					<li><a href="webuser/PubHome.do"><span
							class=" glyphicon glyphicon-list-alt"></span>&nbsp;我的空间</a></li>
<%--					<li><a href="resume/contacts.html"><span--%>
<%--							class="glyphicon glyphicon-earphone"></span>&nbsp;通讯录</a></li>--%>


					<%
						String agent = request.getHeader("User-Agent").toLowerCase();
						if (agent.indexOf("dingtalk-win") > 0) {
					%>
					<li><a href="dingding/PubOpenLink.do"><span
							class="glyphicon glyphicon-globe"></span>&nbsp;打开外部浏览器</a></li>
					<%
						}
					%>
					<c:if test="${USEROBJ!=null&&!empty USERMENU}">
						<li><a href="frame/index.do"><span
								class="glyphicon glyphicon-cog"></span>&nbsp;管理控制台</a></li>
					</c:if>
					<li><a href="login/webout.do"><span
							class="glyphicon glyphicon-off"></span>&nbsp;注销</a></li>
				</ul></li>
<%--				<li class="active"><a href="webuser/PubHome.do"><span--%>
<%--						class="glyphicon glyphicon-user"></span>&nbsp;${USEROBJ.name}</a></li>--%>
<%--				<li class="active"><a href="login/webout.html"><span--%>
<%--						class="glyphicon glyphicon-off"></span>&nbsp;注销</a></li>--%>
			</c:if>
		</ul>
	</div>
</div>


<script type="text/javascript">
	function luceneSearch(key) {
		$('#wordId').val(key);
		$('#lucenesearchFormId').submit();
	}
	function luceneSearchGo(page) {
		$('#pageNumId').val(page);
		$('#lucenesearchFormId').submit();
	}

</script>